import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { SharedModule } from '@shared/shared.module';

import { RandomUserService } from './randomUser.service';
import {StatisticsComponent} from "./statistics.component";
import {ProjectComponent} from "./project/project.component";
import {ClassroomComponent} from "./classroom/classroom.component";
import {AfterClassComponent} from "./after-class/after-class.component";
import {DetailsComponent} from "./details/details.component";

const routes: Routes = [
    // { path: '', component: StatisticsComponent },
    // { path: 'project', component: ProjectComponent },
    // { path: 'classroom', component: ClassroomComponent },
    // { path: 'afterClass', component: AfterClassComponent },
    // { path: 'details/:id', component: DetailsComponent }

    { path: '', component: StatisticsComponent ,
        children: [
            // { path: '', redirectTo: 'pro-list/cloud', pathMatch: 'full' },
            { path: 'project', component: ProjectComponent },
            { path: 'classroom', component: ClassroomComponent },
            { path: 'afterClass', component: AfterClassComponent },
            { path: 'details', component: DetailsComponent }
        ]
    }
];

@NgModule({
    imports: [
        SharedModule,
        RouterModule.forChild(routes)
    ],
    providers: [ RandomUserService ],
    declarations: [
        StatisticsComponent,
        ProjectComponent,
        ClassroomComponent,
        AfterClassComponent,
        DetailsComponent
    ],
    exports: [
        RouterModule
    ],
    entryComponents: [

    ]
})
export class StatisticsModule { }
